﻿<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>{$sub.chname}-微课管理系统</title>
		<link href="__PUBLIC__/css/main.css" rel="stylesheet" type="text/css" />
		<link href="__PUBLIC__/css/swu.css" rel="stylesheet" type="text/css" />
		<script>
			var base = "";
		</script>
		<script type='text/javascript' src='__PUBLIC__/js/common.js'></script>
		<script type='text/javascript' src='__PUBLIC__/js/core.js'></script>
		<script type='text/javascript' src='__PUBLIC__/js/engine.js'></script>
		<script type='text/javascript' src='__PUBLIC__/js/util.js'></script>
		<script type='text/javascript' src='__PUBLIC__/js/dwrclass.js'></script>
		<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
		<script type='text/javascript' src='__PUBLIC__/js/alert.js'></script>
		<link id="artDialog-skin" href="__PUBLIC__/css/default.css" rel="stylesheet" />
		<script src="__PUBLIC__/js/jquery.artdialog.js" type="text/javascript"></script>
		<script src="__PUBLIC__/js/jquery.ajax.js" type="text/javascript"></script>
		<script src="__PUBLIC__/js/jquery.timers.js" type="text/javascript"></script>
		<script src="__PUBLIC__/js/user.js" type="text/javascript"></script>
	</head>

	<body style="background:#f8f8f8">
		<div id="header">

			<div class="menu_auto">
				<div class="menu_logo">
					<a class="logoName" href="__APP__/Home/Index/">返回到首页</a>
					<a class="logoNames" href="__APP__/Home/Index/">返回到首页</a>
				</div>
			</div>
		</div>
		<div id="center">
			<div class="border_bookTitle">
				<div class="bookPic_180">
					<a href="__APP__/Home/Index/book.html?id={$sub.sub_code}"><img src="__ROOT__/{$sub.imgpath}" width="180" height="115" /></a>
				</div>
				<div class="bookName_800">
					<h3><a href="__APP__/Home/Index/book.html?id={$sub.sub_code}">{$sub.chname}</a></h3>
					<!--<p class="Grey">主讲教师： 周林波&nbsp;&nbsp;-->
					</p>
				</div>
				<div class="clear"></div>
			</div>
			<div class="content_padtb20">
				<div class="column_border_340">
					<h4 class="twoNav_title">
						<span class="icoNav_9">目录</span>
					</h4>
					<dl class="bookNav_list">
						<volist name="section" id="sect">
							<if condition="$sect['parentid']==0">
							<dt name="zj" id="{$sect.sectionid}" onclick="showHideZj({$sect.sectionid},this);"><span class="chapterNum">{$i}</span>{$sect.chname}</dt>
								<dd id="zj_{$sect.sectionid}">
									<ul>
										<volist name="section" id="sec" key="k">
										<if condition="$sec['parentid']==$sect['sectionid']">
										<li class="">
											<a href="javascript:;" onclick="addthing({$sect.sectionid});">{$sect.chname}</a>
										</li>
										</if>
										</volist>
									</ul>
								</dd>
							</if>
						</volist>
					</dl>
				</div>

				<script>
					var zjid = 0;
					$("dt[name='zj']").each(function() {
						var id = $(this).attr("id");
						try {
							$("#" + id).removeClass("navClose");
							$("#" + id).removeClass("navOpen");
							$("#zj_" + id).removeClass("display_no");
						} catch(e) {}
						if(parseInt(id) == parseInt(zjid)) {
							$("#" + id).attr("title", "收起");
							$("#" + id).addClass("navOpen");
							$("#zj_" + id).removeClass("display_no");
						} else {
							$("#" + id).attr("title", "展开");
							$("#" + id).addClass("navClose");
							$("#zj_" + id).addClass("display_no");
						}
					});

                    // $(".bookNav_list dt").click(function (id) {
						// addthing(id)
                    // })
					function showHideZj(id,element) {
                         ads(element);
                        addthing(id);
					};
					function ads(element) {
						$(element).addClass("on").siblings().removeClass("on");
                    }
					function addthing(id) {
						$.ajax({
							type: 'POST',
							url: '',
							dataType: 'json',
							data:{
								id:id,
							},
							success: function(data){
								var m=0;
								var p=0;
								var w=0;
                                $("#mic,#ppt,#word").html("");
								for(var i=0;i<data.length;i++){
									if(data[i].rescode==0 && m<=7){

										$("#mic").append(" <li><a href='__APP__/Home/Index/video/id/"+data[i].resid+".html'>"+ data[i].resname +"</a></li>");
										m++;
									}else if(data[i].rescode==1&&p<=7){

										$("#ppt").append("<li><img style='width:25px;height:25px;float:left;' src='__PUBLIC__/images/ppt.png' />  <a href='http://view.officeapps.live.com/op/view.aspx?src=ydl.loseboy.cn/"+data[i].respath+"'>"+ data[i].resname +"</a></li>");
										p++;
									}else if(data[i].rescode==2&&w<=7){

										$("#word").append(" <li><a href='http://view.officeapps.live.com/op/view.aspx?src=ydl.loseboy.cn/"+data[i].respath+"'>"+ data[i].resname +"</a></li>");
										w++;
									}else{
										break;
									}
								}

							},
							error:function(data) {
								
							},
						});
					}
				</script>
                
                
				<div class="columns">
                
                    <div class="column_640 right">
                        <div class="twoTab_content" id="msg_1" >
                            <img src="__PUBLIC__/images/data.png"/ style="position: absolute; margin-top: 4px; margin-left: 2px;">
                            <h4 class="title_bgBlue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PPT</h4>
                            <div class="border_bottom_640">
                                <div class="intro_courses">
                                   <ul id="ppt">
                                   		
                                   </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="column_640 right">
                        <div class="twoTab_content" id="msg_1">
                            <img src="__PUBLIC__/images/play.png"/ style="position: absolute;">
                            <h4 class="title_bgBlue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;微课</h4>
                            <div class="border_bottom_640">
                                <div class="intro_course">
                                   <ul id="mic">
                                   		
                                   </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="column_640 right">
                        <div class="twoTab_content" id="msg_4">
                            <img src="__PUBLIC__/images/discuss.png"/ style="position: absolute; margin-top: 6px; margin-left: 3px;">
                            <h4 class="title_bgBlue">
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;试卷
                            </h4>
                            <div class="border_bottom_640">
                                <div id="showajaxinfo"></div>
                                <script>
                                    ajax('showajaxinfo', 'id=1074', 'book_show_2.html', 1);
                                </script>
                            </div>
                        </div>
                    </div>
                    
                    <div class="column_640 right">
                        <div class="twoTab_content" id="msg_3">
                            <img src="__PUBLIC__/images/data_download.png"/ style="position: absolute;">
                            <h4 class="title_bgBlue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;文档</h4>
                            <div class="border_bottom_640">
                             <div class="intro_courses">
                                   <ul id="word">
                                   		
                                   </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    
                 </div>
                    
				<div class="clear"></div>
			</div>
		</div>
		<script>
			function showLay(index) {
				for(var i = 1; i <= 4; i++) {
					if(i == index) {
						$("#msg_" + i).show();
						$("#title_" + i).removeClass("on");
						$("#title_" + i).addClass("on");
					} else {
						$("#msg_" + i).hide();
						$("#title_" + i).removeClass("on");
					}
				}
			}
		</script>
		<include file='footer'/>
	</body>
<script type="text/javascript" src="__PUBLIC__/hui/lib/jquery/1.9.1/jquery.min.js"></script>
</html>